home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / diff / diff_115.zoo / Makefile.cross < prev    next >
Encoding:
Makefile  |  1991-09-25  |  4.1 KB  |  124 lines

  1. # Makefile for GNU DIFF
  2. # Copyright (C) 1988, 1989 Free Software Foundation, Inc.
  3.  
  4. # This file is part of GNU DIFF.
  5.  
  6. # GNU DIFF is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 1, or (at your option)
  9. # any later version.
  10. # GNU DIFF is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with GNU DIFF; see the file COPYING.  If not, write to
  16. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # You can compile this with ordinary cc as well,
  19. # but gcc makes it faster.
  20. # Also, gcc supports -O and -g together.
  21. #
  22. # AKP 1/91: I have added a NO_PAGINATE flag so diff doesn't use
  23. # pipe, fork, or exec.  That way it compiles on my non-UNIX system.
  24. # Ditto DONT_USE_STAT_INO (set when the ino field of a stat struct
  25. # isn't reliable).  I have made no effort to make diff3 work;
  26. # it's included here for completeness only.
  27. #
  28. # If you set both of these to zero (or leave them out) you get the
  29. # original code exactly.  If you set any of them then diff -v gives
  30. # a modified message.
  31. #
  32.  
  33. #CC=gcc -O
  34. #CFLAGS = -g
  35. CC=cgcc
  36. CFLAGS=-O -DNO_PAGINATE=1 -DDONT_USE_STAT_INO=1 -DNDEBUG -fomit-frame-pointer \
  37. -fcombine-regs
  38. LIBS=
  39. INSTALL = install
  40.  
  41. # On system V, enable these three lines:
  42. # CFLAGS = -g -DUSG
  43. # LIBS = -lPW
  44. # INSTALL = cp
  45. # (If you compile with GCC, you don't need to define LIBS.)
  46. # And, depending on the names and contents of your header files,
  47. # add either -DHAVE_NDIR or -DHAVE_DIRECT or both to CFLAGS.
  48. # Add -DHAVE_NDIR to CFLAGS if your system used ndir.h instead of dirent.h
  49. # Add -DHAVE_DIRECT to CFLAGS if your system uses 'struct direct' instead of
  50. # 'struct dirent' (this is the case at least with one add-on ndir library).
  51.  
  52. # Use these definitions for XENIX:
  53. # There are rumors of bugs in various Xenix's dirent.h and -ldir.  As
  54. # a result, we suggest using HAVE_NDIR and not using -ldir.
  55. # CFLAGS = -O -DUSG -DXENIX -DHAVE_NDIR -DHAVE_DIRECT -DNDIR_IN_SYS
  56. # LIBS = -lx -lPW
  57. # INSTALL = cp
  58.  
  59. # Some System V machines do not come with libPW.  If this is true, use
  60. # the GNU alloca by switching the comment on the following lines.
  61. ALLOCA = 
  62. # ALLOCA = $(archpfx)/alloca.o
  63.  
  64. bindir=/net/acae127/home/bammi/bin
  65. prefix=
  66.  
  67. # All source files
  68. srcs=diff.c analyze.c io.c context.c ed.c normal.c ifdef.c util.c dir.c \
  69.     version.c diff.h regex.c regex.h limits.h diff3.c \
  70.     getopt.c getopt1.c getopt.h alloca.c
  71. # Object files for diff only.
  72. objs=$(archpfx)diff.o $(archpfx)analyze.o $(archpfx)io.o $(archpfx)context.o \
  73.      $(archpfx)ed.o $(archpfx)normal.o $(archpfx)util.o $(archpfx)dir.o \
  74.      $(archpfx)regex.o $(archpfx)ifdef.o $(archpfx)version.o \
  75.      $(archpfx)getopt.o $(archpfx)getopt1.o
  76. tapefiles = $(srcs) README diagmeet.note Makefile COPYING ChangeLog
  77.  
  78. #all: $(archpfx)diff $(archpfx)diff3
  79. all: $(archpfx)diff.ttp
  80.  
  81. $(archpfx)diff3: $(archpfx)diff3.o
  82.     $(CC) -o $(archpfx)diff3 $(CFLAGS) $(LDFLAGS) $(archpfx)diff3.o $(LIBS)
  83.  
  84. $(archpfx)diff.ttp: $(objs)
  85.     $(CC) -o $(archpfx)diff.ttp $(CFLAGS) $(LDFLAGS) $(objs) $(LIBS)
  86.  
  87. $(objs): diff.h
  88.  
  89. $(archpfx)context.o $(archpfx)diff.o: regex.h
  90.  
  91. $(archpfx)diff3.o: diff3.c
  92.     $(CC) -c $(CFLAGS) -DDIFF_PROGRAM=\"$(bindir)/diff\" diff3.c \
  93.  $(OUTPUT_OPTION)
  94.  
  95. clean:
  96.     rm -f *.o $(archpfx)diff $(archpfx)diff3 diff.tar diff.tar.Z
  97.  
  98. install: install-diff install-diff3
  99.  
  100. install-diff: $(prefix)$(bindir)/diff
  101.  
  102. $(prefix)$(bindir)/diff: $(archpfx)diff
  103.     $(INSTALL) $(archpfx)diff $(prefix)$(bindir)/diff
  104.  
  105. install-diff3: $(prefix)$(bindir)/diff3
  106.  
  107. $(prefix)$(bindir)/diff3: $(archpfx)diff3
  108.     $(INSTALL) $(archpfx)diff3 $(prefix)$(bindir)/diff3
  109.  
  110. diff.tar: $(tapefiles)
  111.     mkdir tmp
  112.     mkdir tmp/diff
  113.     -ln $(tapefiles) tmp/diff
  114.     for file in $(tapefiles); do \
  115.         if [ ! -r tmp/diff/$$file ]; then cp $$file tmp/diff; fi \
  116.     done
  117.     cd tmp; tar cf ../diff.tar diff
  118.     rm -rf tmp
  119.  
  120. diff.tar.Z: diff.tar
  121.     compress < diff.tar > diff.tar.Z
  122.